import Banner from '@/components/Banner'
import Vue from "vue"
import axios from "axios"

export default {
	name:"trade",
	components:{    	   	    	
    	'Bannerm':Banner,   	    	  		    	
  },
  data () {
    return {
      bannerimgs:[
    		   	
    	],
    	perperson:0,//人均
    	tradename:'店名',
    	tradeaddress:'地址',
    	yysj:'',
    	pssj:'',
    	call:'',
    	comment:'1210',//评论数量
    	notice:[
    		{imgurl:'static/images/banner3.png',
    		 name:'巴西烤肉',     
		     sales:200,
		     make:'店长推荐',
		     price:'88.00'
    		},
    	],//商家公告
    	favourable:[
    		{
		     price1:'88',
		     price2:'100'
    		},
    		{
		     price1:'166',
		     price2:'200'
    	},
    	],//商家活动
    	commentmakes:[{name:'全部'},{name:'最新'},{name:'晒图评价'},{name:'追加评价'}],
    	makeindex:0,
    	evaluations:[],//评论
    	inputdata:5,//星级
    }
 },
 created() {  	
		axios.get('storeInfo?id=1').then((res) => {
		    var trade= res.data;
		   this.tradename=trade.sjmc;
		   this.tradeaddress=trade.psfw+' '+trade.mddz;
		   this.yysj=trade.yysj;
		   this.pssj=trade.pssj;
		   this.call=trade.lxdh;
		   var img={};
		   img.imgurl=trade.banerimg;
		   this.bannerimgs.push(img);
		   
		    console.log(res.data)		      
		});	
		axios.get('storeReview?cpid=1').then((res) => {
		    this.evaluations = res.data;
		     console.log(this.evaluations);
		    this.comment=this.evaluations.length;		    
		   // this.inputdata=this.evaluations[0].plxj;
		   		      
		});
  },
  methods: {
	Call:function (){ 
		//console.log(this.call);
		window.location.href ='tel:' + this.call;
	},
	onmake: function (index){ 	    		
			this.makeindex=index;			
	 },
  }	    
}